package com.tron.utils.tron;


import com.tron.entity.TronAccount;

import java.math.BigDecimal;
import java.math.BigInteger;


public interface TronService {
    /**
     * 生成基本的Tron地址
     * @return
     */
    public TronAccount generateAddress();

    /**
     * 查询TRON的余额
     * @param address
     * @param privateKey
     * @return
     */
    public Long searchTrcBalance(String address, String privateKey);

    /**
     * 获取TRC20,usdt的账户余额
     * @param privateKey
     * @param accountAddr
     * @return
     */
    public BigInteger searchTRC20Balance(String privateKey, String accountAddr);

    /**
     * TRX转账
     * @param fromAddress
     * @param privateKey
     * @param toAddress
     * @param amount
     * @return
     */
    public String sendTRXTransaction(String fromAddress, String privateKey, String toAddress, Long amount);

    /**
     * TRC20的USDT转账
     * @param privateKey
     * @param fromAddress
     * @param toAddress
     * @param amount
     * @return
     */
    public String sendTRC20USDTTransaction(String privateKey, String fromAddress, String toAddress, BigDecimal amount);
    /**
     * TRC10转账
     * @param privateKey
     * @param fromAddress
     * @param toAddress
     * @param contractAddress
     * @param amount
     * @return
     */
    public String sendTRC10Transaction(String privateKey, String fromAddress, String toAddress, String contractAddress, Long amount);

}
